#ifndef MYCLIENT_H
#define MYCLIENT_H

#include<QObject>
#include<QTcpSocket>

class MyClient:public QObject//对于信号与槽的必须
{
    Q_OBJECT
public:
    explicit MyClient(QObject *parent=nullptr);
    void connectServer(unsigned short port,QString ip);
    void sendm(QByteArray mm);
    //void MyClient::displayError(QAbstractSocket::SocketError socketError);
signals:
    void connectOK();
    void gameover();
    void mmrecived(QString);
    void mmsend();
private:
    QTcpSocket* m_tcp;
private slots:
    void displayError(QAbstractSocket::SocketError socketError);
};

#endif // MYCLIENT_H
